<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'main.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<h1>简易社区</h1>
  	<ul>
  		<li><a href="main.action">信息浏览</a></li>
  		<li><a href="controlPanel_input.action">控制面板</a></li>
  		<li><a href="logout.action">退出</a></li>
  	</ul>
  	<s:iterator value="informations.keySet()" id="listTitle">
	  	<ol>
	  		<li><s:property value="#listTitle"/></li>
	  	</ol>
  		<s:iterator value="informations.get(#listTitle)">
  			<s:url id="detail" action="information_detail.action">
  				<s:param name="infoId"><s:property value="id"/></s:param>
  			</s:url>
  			<p><s:a href="%{detail}"><s:property value="title" /></s:a></p>
  			<p><s:date name="publishingTime" format="yy-mm-dd HH:MM:ss"/> </p>
  		</s:iterator>
  			<ul>
	  			<s:url id="readMore" action="information_list">
	  				<s:param name="listTitle"><s:property value="#listTitle"/></s:param>
	  			</s:url>
	  			<li><s:a href="%{readMore}">更多。。</s:a></li>
	  		</ul>
  	</s:iterator>
  	<h2>发布信息</h2>
  	<p><s:a href="information_input.action">发布</s:a></p>
  </body>
</html>
